home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Resource for Source: C/C++
/
Resource for Source - C-C++.iso
/
codelib6
/
v_08_11
/
8n11010a
< prev
next >
Wrap
Text File
|
1995-11-01
|
3KB
|
171 lines
/* isalnum function
* copyright (c) 1990 by P.J. Plauger
*/
#include <ctype.h>
/* test for alphanumeric character
*/
#undef isalnum
int isalnum(int c)
{
return (_Ctype[c] & (_DI|_LO|_UP|_XA));
}
/* isalpha function
* copyright (c) 1990 by P.J. Plauger
*/
#include <ctype.h>
/* test for alphabetic character
*/
#undef isalpha
int isalpha(int c)
{
return (_Ctype[c] & (_LO|_UP|_XA));
}
/* iscntrl function
* copyright (c) 1990 by P.J. Plauger
*/
#include <ctype.h>
/* test for control character
*/
#undef iscntrl
int iscntrl(int c)
{
return (_Ctype[c] & (_BB|_CN));
}
/* isdigit function
* copyright (c) 1990 by P.J. Plauger
*/
#include <ctype.h>
/* test for digit
*/
#undef isdigit
int isdigit(int c)
{
return (_Ctype[c] & _DI);
}
/* isgraph function
* copyright (c) 1990 by P.J. Plauger
*/
#include <ctype.h>
/* test for graphic character
*/
#undef isgraph
int isgraph(int c)
{
return (_Ctype[c] & (_DI|_LO|_PU|_UP|_XA));
}
/* islower function
* copyright (c) 1990 by P.J. Plauger
*/
#include <ctype.h>
/* test for lowercase character
*/
#undef islower
int islower(int c)
{
return (_Ctype[c] & _LO);
}
/* isprint function
* copyright (c) 1990 by P.J. Plauger
*/
#include <ctype.h>
/* test for printable character
*/
#undef isprint
int isprint(int c)
{
return (_Ctype[c] & (_DI|_LO|_PU|_SP|_UP|_XA));
}
/* ispunct function
* copyright (c) 1990 by P.J. Plauger
*/
#include <ctype.h>
/* test for punctuation character
*/
#undef ispunct
int ispunct(int c)
{
return (_Ctype[c] & _PU);
}
/* isspace function
* copyright (c) 1990 by P.J. Plauger
*/
#include <ctype.h>
/* test for spacing character
*/
#undef isspace
int isspace(int c)
{
return (_Ctype[c] & (_CN|_SP|_XS<~>));
}
/* isupper function
* copyright (c) 1990 by P.J. Plauger
*/
#include <ctype.h>
/* test for uppercase character
*/
#undef isupper
int isupper(int c)
{
return (_Ctype[c] & _UP);
}
/* isxdigit function
* copyright (c) 1990 by P.J. Plauger
*/
#include <ctype.h>
/* test for hexadecimal digit
*/
#undef isxdigit
int isxdigit(int c)
{
return (_Ctype[c] & _XD);
}
/* tolower function
* copyright (c) 1990 by P.J. Plauger
*/
#include <ctype.h>
/* convert to lowercase character
*/
#undef tolower
int tolower(int c)
{
return (_Tolower[c]);
}
/* toupper function
* copyright (c) 1990 by P.J. Plauger
*/
#include <ctype.h>
/* convert to uppercase character
*/
#undef toupper
int toupper(int c)
{
return (_Toupper[c]);
}